package adv330;

import java.io.File;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest {
    public static void main(String[] args) {
       // File f0=new File("D:\\temp\\kecheng.html");
        //File f=new File("D:/temp/kecheng.html");
        File f=new File("d:/java83");
        //File f2=new File("D:\\temp","kecheng.html");

        System.out.println("文件存在？"+f.exists());

        System.out.println("是不是目录？"+f.isDirectory());
        System.out.println("是不是文件？"+f.isFile());
        System.out.println("文件的名字:"+f.getName());
        System.out.println("目录："+f.getParent());
        System.out.println("大小："+f.length()+"字节");
        System.out.println(f.lastModified());
        System.out.println("能不能读："+f.canRead());
        System.out.println("能不能写："+f.canWrite());
        System.out.println("能不能执行："+f.canExecute());

    }
}
